import BaseRole from "battle/components/role/BaseRole";
import Map from "battle/components/Map";
import { StaticBullet } from "battle/components/role/Bullet";

/**
 * 大兵
 */

 export default class Soldier extends BaseRole {

    constructor(data) {
        super(data);
        this.ho = 1;
    }

    attack(data) {
        let mapView = Map.getInstance();
        
        let count = 0;
        let _loop = ()=> {
            if (++count==5) Laya.timer.clear(this, _loop);
            let bullet = new StaticBullet();
            bullet.pos(this.x, this.y);
            mapView.addChild(bullet);
            bullet.flyTo(this.x+100, this.y+100);
        };

        Laya.timer.loop(50, this, _loop);
    }

    useSkill() {

    }
	
	


 }